﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace StoreManagementSystem.DomainObjects
{
    public class Aisle : Entity
    {
        private string m_id;
        private string m_Name;
        private IList<Category> m_CategoryListLeft;
        private IList<Category> m_CategoryListRight;

        public string id
        {
            get { return m_id; }
            set { m_id = value; }
        }

        public string Name
        {
            get { return m_Name; }
            set { m_Name = value; }
        }

        public IList<Category> CategoryListLeft
        {
            get { return m_CategoryListLeft; }
            set { m_CategoryListLeft = value; }
        }

        public IList<Category> CategoryListRight
        {
            get { return m_CategoryListRight; }
            set { m_CategoryListRight = value; }
        }
        
        /// <summary>
        /// Return true if product added successfully
        /// </summary>
        /// <param name="cat"></param>
        /// <returns></returns>
        public bool AddCategory(Category cat)
        {
            return true;
        }

        /// <summary>
        /// Return true if product deleted successfully
        /// </summary>
        /// <param name="cat"></param>
        /// <returns></returns>
        public bool DeleteCategory(Category cat)
        {
            return true;
        }
        
        /// <summary>
        /// Checks if a product exists in the aisle
        /// </summary>
        /// <param name="prod"></param>
        /// <returns></returns>
        private bool CategoryExists(Category cat)
        {
            return true;
        }

        /// <summary>
        /// Returns list of products for a specific aisle
        /// </summary>
        /// <returns></returns>
        public List<Category> Categories()
        {
             return new List<Category>();
        }

        public Aisle(string id, string Name)
        {
            this.id = id;
            this.Name = Name;
            m_CategoryListLeft = new List<Category>();
            m_CategoryListRight = new List<Category>();
        }

        public Aisle()
        {
            this.id = "0";
            this.Name = "";
            m_CategoryListLeft = new List<Category>();
            m_CategoryListRight = new List<Category>();
        }
    }
}